package part1.api.io.iotest;

import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
//        String line = "我们的大中国，我爱中国";
//        FileOutputStream fos = new FileOutputStream("a.txt");
//        byte[] data = line.getBytes(StandardCharsets.UTF_8);
//        fos.write(data);
//        System.out.println("写出完毕");
//        fos.close();


        String line = "\u0080";
        FileOutputStream fos = new FileOutputStream("ab.txt");
        byte[] data = line.getBytes(StandardCharsets.UTF_8);
        System.out.println(Arrays.toString(data));
        fos.write(data);
        System.out.println("写出完毕");
        fos.close();
        char a = 128;
        System.out.println(a);
    }
}
